import static org.junit.Assert.*;

public class NGuessNumberTest {

    @org.junit.Test
    public void generateAnswer() {
        NGuessNumber nGuessNumber = new NGuessNumber();
        int[] arr = nGuessNumber.generateAnswer();
        assert arr.length == 4 : "长度为4";
        for(int temp = 0;temp < arr.length;temp++){
            assert arr[temp] <= 9 && arr[temp] >= 0 : "0-9之间";
            for(int temp2 = 0;temp2 < arr.length;temp2++){
                assert arr[temp] != arr[temp2] || temp == temp2 : "不重复";
            }
        }
    }

    @org.junit.Test
    public void getPlayerInput() {
        NGuessNumber nGuessNumber = new NGuessNumber();
        int[] ints = nGuessNumber.getPlayerInput();
        assert ints.length == 4 : "长度为4";
    }

    @org.junit.Test
    public void compareGuessAnswerTest1(){
        int[] input = {1,2,3,4};
        int[] answer = {1,2,3,4};
        NGuessNumber nGuessNumber = new NGuessNumber();
    }

    @org.junit.Test
    public void compareGuessAnswerTest2(){
        int[] input = {1,1,1,1};
        int[] answer = {1,2,3,4};
        NGuessNumber nGuessNumber = new NGuessNumber();
    }

    @org.junit.Test
    public void compareGuessAnswerTest3(){
        int[] input = {1,1,1,1};
        int[] answer = {1,2,3,4};
        NGuessNumber nGuessNumber = new NGuessNumber();
    }

    @org.junit.Test
    public void compareGuessAnswerTest4(){
        int[] input = {2,3,4,5};
        int[] answer = {2,3,4,5};
        NGuessNumber nGuessNumber = new NGuessNumber();
    }

    @org.junit.Test
    public void compareGuessAnswerTest5(){
        int[] input = {2,3,4,5};
        int[] answer = {2,3,4,6};
        NGuessNumber nGuessNumber = new NGuessNumber();
    }

    @org.junit.Test
    public void isWin1(){
        char[] chars = {'A','A','A','B'};
        NGuessNumber nGuessNumber = new NGuessNumber();
        assert nGuessNumber.isWin(chars) : "应为赢了";
    }

    @org.junit.Test
    public void isWin2(){
        char[] chars = {'A','A','B','B'};
        NGuessNumber nGuessNumber = new NGuessNumber();
        assert !nGuessNumber.isWin(chars) : "应为输了";
    }
}